/*
 * @Author: your name
 * @Date: 2022-01-22 14:05:46
 * @LastEditTime: 2022-01-27 22:29:55
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \json-serveg:\桌面2\VueStudy\vue-ego\vue-ego\src\main.js
 */
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import './assets/css/reset.css' // CSS初始化
import './assets/css/iconfont/iconfont.css' //导入iconfont图标库
import api from './api/index'
import * as echarts from 'echarts'
// console.log('echarts',echarts);

Vue.prototype.$echarts = echarts



Vue.prototype.$api = api

Vue.config.productionTip = false

//持久化
let user = localStorage.getItem('user')
if (user) {
  user =JSON.parse(user),
  store.commit('loginModule/SETUSER',user)
}

new Vue({
  router,
  store,
  beforeCreate(){
    Vue.prototype.$bus = this 
  },
  render: h => h(App)
}).$mount('#app')
